package(default_visibility = ["//visibility:public"])

exports_files([
    "system-config-tmpl.js",
    "system-rxjs-operators.js",
])

# Workaround for https://github.com/bazelbuild/bazel-toolchains/issues/356. We need the
# "SYS_ADMIN" capability in order to run browsers with sandbox enabled.
platform(
    name = "rbe_platform",
    parents = ["@rbe_default//config:platform"],
    remote_execution_properties = """
      {PARENT_REMOTE_EXECUTION_PROPERTIES}
      properties: {
          name: "dockerAddCapabilities"
          value: "SYS_ADMIN"
      }
    """,
)

config_setting(
    name = "view_engine_mode",
    values = {
        "define": "angular_ivy_enabled=False",
    },
)

# This file generates the `angular_ivy_enabled.js` file, which exports a truthy value
# whether Ivy should be enabled based on the `--defined=angular_ivy_enabled` value
# so runtime can detect which mode it is running in.
genrule(
    name = "angular_ivy_enabled",
    outs = ["angular_ivy_enabled.js"],
    cmd = "echo exports.ivyEnabled = \"'True' === '$(angular_ivy_enabled)'\"\\; > $@",
)
